﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Parsers.SpeechSynthesizer
{
    public class InputTextParser
    {
        #region Vars

        private List<string> _lettersLst;

        #endregion

        #region Constructors

        public InputTextParser(string inputText)
        {
            InputText = inputText;
            _lettersLst = new List<string>();
        }

        public InputTextParser()
        {
            _lettersLst = new List<string>();
        }

        #endregion

        #region Properties

        public string InputText { get; set; }

        public List<string> Letters
        { 
            get { return _lettersLst; } 
        }

        #endregion

        #region Public Methods

        public void Parse()
        {
            string inputText = InputText;

            foreach (char letter in inputText)
            {
                _lettersLst.Add(letter == ' ' ? '_'.ToString() : letter.ToString());
            }
        }

        #endregion
    }
}
